<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>提示词管理工具 - 设置</title>
  <link rel="stylesheet" href="options.css">
</head>
<body>
  <div class="container">
    <header>
      <h1>API 配置</h1>
    </header>

    <main>
      <div class="form-group">
        <label for="api-platform">API平台</label>
        <select id="api-platform" class="form-control">
          <option value="aliyun">阿里云通义千问</option>
          <option value="guiji">硅基流</option>
          <option value="openai">OpenAI</option>
        </select>
      </div>

      <div id="api-settings" class="platform-settings">
        <div class="form-group">
          <label for="api-base-url">API基础URL</label>
          <input type="text" id="api-base-url" class="form-control" placeholder="输入API基础URL">
          <small class="form-text">例如: https://dashscope.aliyuncs.com/compatible-mode/v1</small>
        </div>
        <div class="form-group">
          <label for="api-key">API Key</label>
          <input type="password" id="api-key" class="form-control" placeholder="输入API Key">
        </div>
      </div>

      <div class="form-group">
        <label for="chat-model">对话模型</label>
        <select id="chat-model" class="form-control">
          <optgroup label="阿里云">
            <option value="qwq-32b">通义千问 - QWQ-32B</option>
            <option value="qwq-plus">通义千问 - QWQ-Plus</option>
            <option value="qwen-turbo">通义千问 - Turbo</option>
            <option value="qwen-plus">通义千问 - Plus</option>
            <option value="qwen-max">通义千问 - Max</option>
          </optgroup>
          <optgroup label="硅基流">
            <option value="Qwen/Qwen2.5-72B-Instruct">Qwen2.5-72B-Instruct</option>
            <option value="Pro/deepseek-ai/DeepSeek-R1">DeepSeek-R1</option>
          </optgroup>
          <optgroup label="OpenAI">
            <option value="gpt-4">GPT-4</option>
            <option value="gpt-3.5-turbo">GPT-3.5-Turbo</option>
          </optgroup>
        </select>
      </div>

      <div class="form-group">
        <label for="embedding-model">向量嵌入模型</label>
        <select id="embedding-model" class="form-control">
          <optgroup label="阿里云">
            <option value="text-embedding-v2">Text Embedding V2</option>
          </optgroup>
          <optgroup label="硅基流">
            <option value="embedding-2">Embedding-2</option>
          </optgroup>
          <optgroup label="OpenAI">
            <option value="text-embedding-3-small">Text Embedding 3 Small</option>
            <option value="text-embedding-3-large">Text Embedding 3 Large</option>
          </optgroup>
        </select>
      </div>

      <div class="action-buttons">
        <button id="save-settings" class="btn primary">保存设置</button>
        <button id="test-connection" class="btn secondary">测试连接</button>
      </div>
    </main>
    
    <div id="status-message" class="status-message"></div>
    
    <div class="api-docs">
      <h3>API URL参考</h3>
      <ul>
        <li><strong>阿里云通义千问</strong>: https://dashscope.aliyuncs.com/compatible-mode/v1</li>
        <li><strong>硅基流</strong>: https://api.siliconflow.cn/v1</li>
        <li><strong>OpenAI</strong>: https://api.openai.com/v1</li>
      </ul>
    </div>
  </div>

  <script src="options.js"></script>
</body>
</html> 